<template>
  <div class="task-list-block">
    <div class="block-header">
      <span class="block-title">监测任务</span>
    </div>
    <div class="task-list-content">
      <div class="task-list-table">
        <div class="task-list-row task-list-row-head">
          <span></span>
          <span>任务编号</span>
          <span>监测点</span>
          <span>状态</span>
          <span>进度</span>
        </div>
        <div class="task-list-row" v-for="item in tasks" :key="item.id">
          <span class="row-icon">
            <img :src="item.icon" alt="icon" />
          </span>
          <span>{{ item.id }}</span>
          <span>{{ item.point }}</span>
          <span :class="['status', item.status]">
            <i class="status-dot"></i>{{ item.statusText }}
          </span>
          <span>{{ item.progress }}</span>
        </div>
      </div>
    </div>
    <div class="task-list-shadow"></div>
  </div>
</template>

<script setup>
const tasks = [
  { id: '123456789', point: '监测点A', status: 'doing', statusText: '进行中', progress: '2/3', icon: 'https://cdn.jsdelivr.net/gh/iconoir-icons/svg/eye-empty.svg' },
  { id: '123456790', point: '监测点B', status: 'done', statusText: '已完成', progress: '3/3', icon: 'https://cdn.jsdelivr.net/gh/iconoir-icons/svg/check-circle.svg' },
  { id: '123456791', point: '监测点C', status: 'todo', statusText: '待处理', progress: '0/2', icon: 'https://cdn.jsdelivr.net/gh/iconoir-icons/svg/warning-triangle.svg' },
  { id: '123456792', point: '监测点D', status: 'doing', statusText: '进行中', progress: '1/2', icon: 'https://cdn.jsdelivr.net/gh/iconoir-icons/svg/eye-empty.svg' },
]
</script>

<style scoped>
.task-list-block {
  background: rgba(20,40,80,0.92);
  border-radius: 22px;
  box-shadow: 0 4px 32px #00eaff44, 0 2px 12px #0008;
  padding: 0 0 18px 0;
  position: relative;
  overflow: hidden;
}
.block-header {
  height: 10px;
  background: linear-gradient(90deg, #00eaff 0%, #1e3c5a 100%);
  border-radius: 22px 22px 0 0;
  margin-bottom: 12px;
}
.block-title {
  position: absolute;
  top: 16px;
  left: 32px;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 2px;
  z-index: 2;
  text-shadow: 0 0 6px #00eaff, 0 2px 8px #1e3c5a;
}
.task-list-content {
  padding: 38px 18px 0 18px;
}
.task-list-table {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task-list-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  color: #fff;
  font-size: 15px;
  border-bottom: 1px solid rgba(0,234,255,0.08);
  position: relative;
}
.task-list-row-head {
  font-weight: bold;
  color: #00eaff;
  font-size: 16px;
  border-bottom: 2px solid #00eaff44;
}
.row-icon img {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 4px #00eaff88);
}
.status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: bold;
  box-shadow: 0 0 8px #00eaff33;
  border: 1.5px solid #00eaff88;
  background: linear-gradient(90deg, #00eaff22 0%, #1e3c5a22 100%);
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 2px;
  background: #00eaff;
  box-shadow: 0 0 6px #00eaff;
}
.status.doing {
  color: #00eaff;
  border-color: #00eaff;
  background: linear-gradient(90deg, #00eaff33 0%, #1e3c5a22 100%);
}
.status.doing .status-dot {
  background: #00eaff;
}
.status.done {
  color: #00ff88;
  border-color: #00ff88;
  background: linear-gradient(90deg, #00ff8833 0%, #1e3c5a22 100%);
}
.status.done .status-dot {
  background: #00ff88;
}
.status.todo {
  color: #ffb300;
  border-color: #ffb300;
  background: linear-gradient(90deg, #ffb30033 0%, #1e3c5a22 100%);
}
.status.todo .status-dot {
  background: #ffb300;
}
.task-list-shadow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32px;
  background: linear-gradient(180deg, rgba(0,234,255,0) 0%, #00eaff33 100%);
  border-radius: 0 0 22px 22px;
  pointer-events: none;
}
</style> 
